<template>
  <view>
    <web-view :webview-styles="webviewStyles" :src="url"></web-view>
  </view>
</template>

<script>
import  shareJS from '../../utils/share';
export default {
  mixins:[shareJS],
  data() {
    return {
      url:'',
      webviewStyles: {
        progress: {
          color: '#FF3333'
        }
      }
    }
  },
  onNavigationBarButtonTap(e){

    console.log(e)
    if(e.index===0){
      this.$u.route({url:'/pages/tabBar/my',type:'tab'})
    }else{

      const text =  'WoSmart专注于电商直播产品研发与定制,新生电商系统，包含APP端、小程序端、公众号端、H5端,站在用户的立场，\n' +
          '真正打造符合商家用户操作习惯与业务需求的电商系统';
      this.shareLink = text+this.url;
      this.shareTit = 'WoSmart专注于电商直播产品研发与定制';
      this.shareText = text
      // #ifdef APP-PLUS
      const actionbuttons=[{title:"微信"},{title:"朋友圈"},{title:"复制链接"},{title:'其他'}];
      const actionstyle={title:"请选择分享",cancel:"取消",buttons:actionbuttons};
      plus.nativeUI.actionSheet(actionstyle,e=>{
        if(e.index===1){
          this.shareWebLink('weixin','WXSceneSession')
        }else if(e.index===2){
          this.shareWebLink('weixin','WXSenceTimeline')
        }else if(e.index===3){
          this.copyShareLink()
        }else{
          this.otherShare()
        }

      })
      // #endif
    }

}
}
</script>

<style scoped>

</style>
